package com.xiaoshuidi.cloud.module.report.constant;

public enum IotTypeEnum {

    COLD_WATERMETER("cold_watermeter","水费"),
    AMMETER("ammeter","电费"),
    HOT_WATERMETER("hot_watermeter","热水费"),
    ;

    private String code;
    private String name;

    public String getCode() {
        return code;
    }

    public String getName() {
        return name;
    }

    IotTypeEnum(String code, String name) {
        this.code = code;
        this.name = name;
    }


    public static String getValueByMonth(String code){
        for (IotTypeEnum iotType : IotTypeEnum.values()) {
            if(iotType.code == code){
                return iotType.name;
            }
        }
        return code;
    }
}
